Integrand size = 11, antiderivative size = 16 \[ \int \frac {\csc (x)}{i+\tan (x)} \, dx=i \text {arctanh}(\cos (x))-i \cos (x)+\sin (x) \]
[Out]
Time = 0.11 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.636, Rules used = {3599, 3187, 3186, 2717, 2672, 327, 212} \[ \int \frac {\csc (x)}{i+\tan (x)} \, dx=i \text {arctanh}(\cos (x))+\sin (x)-i \cos (x) \]
[In]
[Out]
Rule 212
Rule 327
Rule 2672
Rule 2717
Rule 3186
Rule 3187
Rule 3599
Rubi steps \begin{align*} \text {integral}& = \int \frac {\cot (x)}{i \cos (x)+\sin (x)} \, dx \\ & = -(i \int \cot (x) (\cos (x)+i \sin (x)) \, dx) \\ & = -(i \int (i \cos (x)+\cos (x) \cot (x)) \, dx) \\ & = -(i \int \cos (x) \cot (x) \, dx)+\int \cos (x) \, dx \\ & = \sin (x)+i \text {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\cos (x)\right ) \\ & = -i \cos (x)+\sin (x)+i \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (x)\right ) \\ & = i \text {arctanh}(\cos (x))-i \cos (x)+\sin (x) \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.94 \[ \int \frac {\csc (x)}{i+\tan (x)} \, dx=-i \cos (x)+i \log \left (\cos \left (\frac {x}{2}\right )\right )-i \log \left (\sin \left (\frac {x}{2}\right )\right )+\sin (x) \]
[In]
[Out]
Time = 1.19 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.31
method | result | size |
default | \(\frac {2}{\tan \left (\frac {x}{2}\right )+i}-i \ln \left (\tan \left (\frac {x}{2}\right )\right )\) | \(21\) |
risch | \(-i {\mathrm e}^{i x}+i \ln \left ({\mathrm e}^{i x}+1\right )-i \ln \left ({\mathrm e}^{i x}-1\right )\) | \(32\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 25 vs. \(2 (12) = 24\).
Time = 0.26 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.56 \[ \int \frac {\csc (x)}{i+\tan (x)} \, dx=-i \, e^{\left (i \, x\right )} + i \, \log \left (e^{\left (i \, x\right )} + 1\right ) - i \, \log \left (e^{\left (i \, x\right )} - 1\right ) \]
[In]
[Out]
\[ \int \frac {\csc (x)}{i+\tan (x)} \, dx=\int \frac {\csc {\left (x \right )}}{\tan {\left (x \right )} + i}\, dx \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 28 vs. \(2 (12) = 24\).
Time = 0.21 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.75 \[ \int \frac {\csc (x)}{i+\tan (x)} \, dx=\frac {2}{\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1} + i} - i \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.25 \[ \int \frac {\csc (x)}{i+\tan (x)} \, dx=-\frac {2 i}{-i \, \tan \left (\frac {1}{2} \, x\right ) + 1} - i \, \log \left (\tan \left (\frac {1}{2} \, x\right )\right ) \]
[In]
[Out]
Time = 4.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.25 \[ \int \frac {\csc (x)}{i+\tan (x)} \, dx=-\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )\,1{}\mathrm {i}+\frac {2}{\mathrm {tan}\left (\frac {x}{2}\right )+1{}\mathrm {i}} \]
[In]
[Out]